package com.chance.cc.crawler.prod.command.trigger.domain.news.zgjkjw;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.news.zgjkjw.ZGJKWCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author lt
 * @version 1.0
 * @date 2021-06-25 11:40:19
 * @email okprog@sina.com
 */
public class ZGJKWCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {

    public static void main(String[] args) {
        publishTraceScheduleTriggerInfo(ZGJKWCrawlerSchedulerJob.crawlerScheduler());
//        publishSimpleScheduleTriggerInfo(ZGJKWCrawlerSchedulerJob.crawlerScheduler());
    }

    public static void publishTraceScheduleTriggerInfo(CrawlerJob crawlerJob){
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                ZGJKWCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 30 1 * * ?",
                "中国健康网追溯采集任务，每天采集一次");
    }

    public static void publishSimpleScheduleTriggerInfo(CrawlerJob crawlerJob){
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                ZGJKWCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "中国健康网临时采集任务，采集一次");
    }
}
